package test2;

public class School implements ComputerAverage{
    @Override
    public double average(double[] x) {
        if (x == null || x.length == 0) {
            System.out.println("数组不能为空或长度为0");
        }
        long sum = 0;
        for (double number : x){
            sum += number;

        }
        return (double) sum / x.length;
    }
}
